﻿using System;
using System.Globalization;
using System.Windows.Data;

namespace Sidvall.UI.Wpf.Converters
{
    public class StringFormatConverter : IValueConverter
    {
        #region Public Members

        #region Convert

        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return string.Format(System.Globalization.CultureInfo.CurrentCulture, (string)parameter, value);
        }

        #endregion
        #region ConvertBack

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotSupportedException();
        }

        #endregion

        #endregion
    }
}
